﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TPOJ.IDAL;
using TPOJ.DALFactory;
using TPOJ.Model;

namespace TPOJ.BLL
{
    public class AccountBO
    {
        private static readonly IAccountDAO dal = DataAccess.CreateAccountDAO();

        public Account GetAccountByName(string accountName)
        {
            return dal.GetAccountByName(accountName);
        }

        public Account GetAccount(int userId)
        {
            return dal.GetAccount(userId);
        }

        public int GetAccountRank(int userId)
        {
            return dal.GetAccountRank(userId);
        }

        public IList<Tuple<int, Account>> GetNeighboursByUserId(int userId, out int rank)
        {
            return dal.GetNeighboursByUserId(userId, out rank);
        }

    }
}
